package me.dr0n3.skyAdopt.Utils;

import java.util.logging.Level;
import java.util.logging.Logger;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;

/**
 * @author dr0n3
 * @date 17.04.2012
 */
public class MessageHelper 
{
    static String sPluginName = "skyAdopt";
    
    
    public static void writeLog(String s, Level level)
    {
        Logger log = Logger.getLogger("Minecraft");
        
        log.log(level, "[" + sPluginName + "] " + s);
    }
    
    public static void sendMessageToPlayer(Player player, String message, boolean succeed)
    {
        if(succeed)
        {
            player.sendMessage(ChatColor.GREEN + message);
        }
        else
        {
            player.sendMessage(ChatColor.RED + message);
        }
    }
}
